<?php

use yii\db\Migration;

class m160120_064302_create_email extends Migration
{
    public function up()
    {
        $this->createTable('email', [
            'id' => $this->primaryKey(),
            'receiver_name'=>$this->string(50),
            'receiver_email'=>$this->string(200),
            'subject'=>$this->string(),
            'content'=>$this->text(),
            'attachment'=>$this->string()
        ]);
    }

    public function down()
    {
        $this->dropTable('email');
    }

    /*
    // Use safeUp/safeDown to run migration code within a transaction
    public function safeUp()
    {
    }

    public function safeDown()
    {
    }
    */
}
